﻿using System.Collections;
using System.Collections.Generic;
using BehaviorDesigner.Runtime.Tasks;
using UnityEngine;

public class IsStateMatch : Conditional
{
    //public bool isExecuted;
    
    public EntityStatusEnum targetState;
    public SharedEntityStatus objectState;


//    public override void OnStart()
//    {
//        isExecuted = false;
//    }

    public override TaskStatus OnUpdate()
    {
        //if (isExecuted) return TaskStatus.Failure;
        
        //isExecuted = true;
        return targetState == objectState.Value ? TaskStatus.Success : TaskStatus.Failure;
    }
}
